package test;

import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

public class Junit5TEst {

	/**
	 * junit4
	 * @BeforeClass 静态方法上
	 * @Before
	 * @Test 
	 * @After
	 * @AfterClass 静态方法上
	 * 
	 * junit5
	 * @BeforeAll 静态方法上
	 * @BeforeEach
	 * @Test
	 * @AfterEach
	 * @AfterAll 静态方法上
	 */
	
	@BeforeAll
	public static void all1() {
		System.out.println("beforeAll...");
	}
	

	@AfterAll
	public static void all2() {
		System.out.println("afterAll...");
	}
	
	@BeforeEach
	public void before() {
		System.out.println("before...");
	}
	
	@Test
	public void a1() {
		System.out.println("a1 test...");
	}
	
	@Test
	public void a2() {
		System.out.println("a2 test...");
	}
	
	@AfterEach
	public void after() {
		System.out.println("after...");
	}
}
